package com.liufh;

import com.liufh.demo.ConsumerComponent;
import com.liufh.service.HelloService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author: liufh
 * @create: 2021-12-30 17:55
 */
public class ConsumerApplication {

    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-consumer.xml");
        context.start();
        System.out.println("服务消费者启动成功...");
        HelloService demoService = context.getBean(HelloService.class);
        System.out.println(demoService.sayHello("mm"));

        ConsumerComponent consumerComponent = context.getBean(ConsumerComponent.class);
        System.out.println(consumerComponent.sayHello("world"));
        System.out.println(consumerComponent.sonTest());
        System.out.println(consumerComponent.aCallBTest());
        System.in.read();
    }

}
